from django.shortcuts import render
from manager.models import Member
from datetime import datetime


def index(request):
    """
    前端大屏可视化视图
    :param request:
    :return:
    """
    # 获取当天的新增会员数据, 获取当前日期
    current_date = '2024-12-27'  # datetime.now()
    # 根据当前日期获取数据库表中的数据
    objects = Member.objects.filter(registerTime__gte=current_date)
    print("objects:", objects)
    return render(request, "index.html", locals())
